package com.cskaoyan.day5;

public class StringEquals {
    public static void main(String[] args) {
        System.out.println(stringEquals(null, null));
        System.out.println(stringEquals("123", null));
        System.out.println(stringEquals(null, "123"));
        System.out.println(stringEquals("123", "123"));
    }

    public static boolean stringEquals(String s1, String s2) {
        if (null == s1 && null == s2) {
            return true;
        }
        if (s1 == null) {
            return s2.equals(s1);
        }
        return s1.equals(s2);
    }
}
